package com.huanmeiqi.lucene.demo.ik;

import org.apache.lucene.analysis.Analyzer;


public final class IKAnalyzer4Lucene7 extends Analyzer {

    private boolean useSmart;

    public boolean useSmart() {
        return this.useSmart;
    }

    public void setUseSmart(boolean useSmart) {
        this.useSmart = useSmart;
    }

    public IKAnalyzer4Lucene7() {
        this(false);
    }

    public IKAnalyzer4Lucene7(boolean useSmart) {
        this.useSmart = useSmart;
    }

    @Override
    protected TokenStreamComponents createComponents(String fileName) {
        IKTokenizer4Lucene7 ikTokenizer4Lucene7 = new IKTokenizer4Lucene7(this.useSmart);
        return new TokenStreamComponents(ikTokenizer4Lucene7);
    }


}
